package com.xbongbong.pro.domain.entity;

import com.xbongbong.paas.enums.DelEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * @author 吴峰
 * @date 2021/03/03 14:22
 */
@Setter
@Getter
@ToString
public class CustomButtonActionEntity implements Serializable {


    private static final long serialVersionUID = 192846980958357575L;
    private Long id;

    private String corpid;

    private Long formId;

    private Integer saasMark;

    private Integer businessType;

    private Long buttonId;
    /**
     * 执行动作
     * @see com.xbongbong.pro.enums.lowcode.LowCodeActionTypeEnum
     */
    private Integer actionType;
    /**
     * 注册服务id
     */
    private Long serviceId;

    /**
     * 参数
     */
    private String param;

    private Integer sort;


    private String creatorId;

    private Long addTime;

    private Long updateTime;

    private Integer del;

    public CustomButtonActionEntity() {
        this.del = DelEnum.NORMAL.getDel();
    }

    public CustomButtonActionEntity(String corpid, Long formId, Integer saasMark, Integer businessType, Long buttonId, Integer actionType, Long serviceId, String param, Integer sort, String creatorId, Long addTime, Long updateTime) {
        this.corpid = corpid;
        this.formId = formId;
        this.saasMark = saasMark;
        this.businessType = businessType;
        this.buttonId = buttonId;
        this.actionType = actionType;
        this.serviceId = serviceId;
        this.param = param;
        this.sort = sort;
        this.creatorId = creatorId;
        this.addTime = addTime;
        this.updateTime = updateTime;
        this.del = DelEnum.NORMAL.getDel();
    }


    public CustomButtonActionEntity(Long id,  Integer actionType, Long serviceId, String param, Integer sort,Long updateTime) {
        this.id = id;
        this.actionType = actionType;
        this.serviceId = serviceId;
        this.param = param;
        this.updateTime = updateTime;
    }
}
